reg export "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" E:\tmp\enviroment\path.reg

cscript E:\tmp\enviroment\path.vbs "%1"